# coding=utf-8
# !/usr/bin/python3
# @Time:2021/2/25 10:51 上午
# @Author:wangyun
# @File:tasks.py
# 定义任务
from celery_tasks.sms.SendSMS import CPP
from celery_tasks.main import celery_app


@celery_app.task(name='send_sms_code')
def send_sms_code(mobile, sms_code, tid):
    # 发送短信验证码 5分钟有效期
    # CPP().send_message(mobile=mobile, datas=[sms_code, 5], tid=constants.SEND_SMS_TEMPLATE_ID)
    result = CPP().send_message(mobile=mobile, datas=[sms_code, 5], tid=tid)
    return result
